<div class="portlet-body form">
	<!-- BEGIN FORM-->
	<?php if(isset($error_message)) echo $error_message; ?>
	<?php
	$attributes = array('class' => 'form-horizontal');
	echo form_open($action, $attributes);
	?>
	<div class="control-group">
		<label class="control-label">NIS</label>
		<div class="controls">
			<input type="text" class="span6 m-wrap" name="sw_nis"
				value="<?php echo $sw_nis;?>" /> <span class="help-inline">(nomor
				induk siswa)</span>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">Nama</label>
		<div class="controls">
			<input type="text" class="span6 m-wrap" name="sw_name"
				value="<?php echo $sw_name;?>" /> <span class="help-inline">(nama
				lengkap siswa)</span>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">Kelas</label>
		<div class="controls">
			<select data-placeholder="Pilih Kelas..." name="kl_id" class="chosen span6" tabindex="6" id="kl_id">
				<option value="" />Pilih Kelas...
				<?php 
					$kl_rank = '0';
					foreach ($row_kl as $kls){
						$selected = '';
						if($kls->kl_id == $kl_id) $selected = 'selected';
						if($kl_rank != $kls->kl_rank) echo '<optgroup label="Tingkat '.$kls->kl_rank.'">';
					?>
						<option value="<?php echo $kls->kl_id;?>" <?php echo $selected;?> />
						<?php echo $kls->kl_name;?>
						<?php if($kl_rank != $kls->kl_rank){
							echo '</optgroup>';
							$kl_rank = $kls->kl_rank;
					}
				}?>
			</select>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">Password</label>
		<div class="controls">
			<input type="password" class="span6 m-wrap" name="sw_pwd"
				value="<?php echo $sw_pwd;?>" /> <span class="help-inline">password
				untuk siswa</span>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">Confirm Password</label>
		<div class="controls">
			<input type="password" class="span6 m-wrap" name="sw_pwd_conf"
				value="<?php echo $sw_pwd;?>" /> <span class="help-inline">Password
				Untuk Siswa</span>
		</div>
	</div>
	<input type="hidden" class="span6 m-wrap" name="sw_id"
		value="<?php echo $id;?>" /> <input type="hidden" class="span6 m-wrap"
		name="tmp_pwd" value="<?php echo $tmp_pwd;?>" />
	<div class="form-actions">
		<button type="submit" class="btn blue">Submit</button>
		<a href="<?php echo base_url().$menu;?>" class="btn grey">Cancel</a>
	</div>
	</form>
	<!-- END FORM-->
</div>
